<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://www.rapid-framework.org.cn/rapid" prefix="rapid"%>
<rapid:override name="frame-content">
	<blockquote class="layui-elem-quote">
		<span class="layui-breadcrumb" lay-separator="/"> <a
			href="user/index">首页</a> <a><cite>评论列表</cite></a>
		</span>
	</blockquote>
	<div class="layui-tab layui-tab-card">
		<table class="layui-table" lay-even lay-skin="nob">
			<colgroup>
				<col width="100">
				<col width="300">
				<col width=200">
				<col width="150">
				<col width="50">
			</colgroup>
			<thead>
				<tr>
					<th>作者</th>
					<th>评论内容</th>
					<th>回复至</th>
					<th>提交于</th>
					<th>ID</th>
				</tr>
			</thead>
			<tbody>
			<c:forEach var="a" items="${pageInfo.list}">
				<tr>
					<td><img
						src="http://cn.gravatar.com/avatar/01459f970ce17cd9e1e783160ecc951c?s=128&d=identicon&r=PG"
						alt="" width="64px"> <strong>${a.commentAuthorName}</strong> <br>
						${a.commentAuthorUrl}<br> ${a.commentAuthorEmail}<br> ${a.commentIp}</td>
					<td class="dashboard-comment-wrap">
					<c:if test="${fn:length(a.commentPname) !=0 }">
							<span class="at">@ </span><a href="https://liuyanzhao.com">${a.commentPname}</a>
					</c:if>
					${a.commentContent}
						<div class="row-actions">
							<span class=""> <a href="comment/reply/${a.commentId}"> 回复
							</a>
							</span> <span class=""> | <a href="comment/edit/${a.commentId}">编辑</a>
							</span> <span class=""> | <a href="comment/delete/${a.commentId}">删除</a>
							</span>
						</div>
					</td>
					<td><a href="article/${ a.commentArticleId}" target="_blank">${ a.article.articleTitle}</a></td>
					<td><fmt:parseDate value="${ a.commentCreateTime}" pattern="y-M-dd'T'H:m" var="myParseDate"></fmt:parseDate> 
						<fmt:formatDate value="${myParseDate}" pattern="yyyy/MM/dd HH:mm"></fmt:formatDate></td>
					<td>${a.commentId}</td>

				</tr>
				</c:forEach>
			</tbody>

		</table>

		<%@ include file="../page.jsp" %>
	</div>
</rapid:override>
<rapid:override name="frame-footer-script">
	<style>
/*覆盖 layui*/
.layui-table {
	margin-top: 0;
}
</style>
</rapid:override>
<%@ include file="../framework.jsp"%>